package com.google.code.garbagecan.jbossasstudy.singleton;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

@Path("/")
public class SingletonREST {

	@Inject
	private SingletonCounter singletonCounter;
	
	@Inject
	private ComponentRegistry componentRegistry;
	
	@Inject
	private PropertyRegistry propertyRegistry;
	
	@GET
	@Path("/count")
	@Produces({ "application/json" })
	public String getCount() {
		return "{\"result\":" + singletonCounter.getA() + singletonCounter.getB() + "}";
	}
	
	@GET
	@Path("/componentRegistry")
	@Produces({ "application/json" })
	public String componentRegistry() {
		// Implement me
		return null;
	}
	
	@GET
	@Path("/propertyRegistry")
	@Produces({ "application/json" })
	public String propertyRegistry() {
		// Implement me
		return null;
	}
}
